package com.atguigu.lease.admin.controller;


import com.atguigu.lease.admin.service.SystemLoginService;
import com.atguigu.lease.model.result.Response;
import com.atguigu.lease.model.vo.CaptchaVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "管理员登录模块")
@RestController
@RequestMapping("/admin/login")
public class SystemLoginController {

    @Autowired
    SystemLoginService systemLoginService;


    @Operation(summary = "获取登录验证码模块")
    @GetMapping("/captcha")
    public Response<CaptchaVo> getCaptcha(){

        //生成验证码，保存验证码的值到reids中
         CaptchaVo vo = systemLoginService.getCaptcha();

        return Response.ok(vo);

    }











}
